package safari.model.member;

import java.sql.SQLException;

public class MemberServiceImpl implements MemberService {
	private MemberDao dao;
	public MemberServiceImpl(MemberDao dao){
		this.dao=dao;
	}
	
	@Override
	public int register(MemberVO mvo) throws SQLException {	
		return dao.register(mvo);	
	}

	@Override
	public int update(MemberVO mvo) throws SQLException {
		return dao.update(mvo);
	}

	@Override
	public int delete(String id) throws SQLException {
		// TODO Auto-generated method stub
		return dao.delete(id);
	}

	@Override
	public MemberVO login(MemberVO mvo) throws SQLException {
		return dao.login(mvo);
	}

	@Override
	public int findIdAndPassword(MemberVO mvo) throws SQLException {
		// TODO Auto-generated method stub
		return 0;
	}

	/**
	 * id 중복안되면 return 0 -> 회원가입 가능 
	 */
	@Override
	public int idCheck(String id) throws SQLException {
		return dao.idCheck(id);
	}

	@Override
	public MemberVO getInfo(String id) throws SQLException {
		return dao.getInfo(id);
	}

}
